package com.zhu.oj.judge.codeSandBox;

import com.zhu.oj.judge.codeSandBox.impl.ExampleCodeSandBox;
import com.zhu.oj.judge.codeSandBox.impl.RemoteCodeSandBox;
import com.zhu.oj.judge.codeSandBox.impl.ThirdPartyCodeSandBox;

public class CodeSandBoxFactory {
    public static CodeSandBox newInstance(String type){
        switch (type){
            case "remote":
                return new RemoteCodeSandBox();
            case "thirdParty":
                return new ThirdPartyCodeSandBox();
            case "example":
            default:
                return new ExampleCodeSandBox();
        }
    }
}
